<!doctype html>
<html lang="en" rem="750">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/static/css/u-reset.min.css">
    <style>
        body {
            padding: 0;
            margin: 0;
            background: url("/static/image/bg.png") no-repeat top center / cover;
        }

        .person {
            width: 2.3rem;
            height: 2.3rem;
            background: url("/static/image/person.png") no-repeat top center /cover;
            position: absolute;
            left: 0;
            right: 0;
            margin: auto;
            top: 2.8rem;
        }

        .person:before {
            content: "";
            width: 2.5rem;
            height: 2.5rem;
            position: absolute;
            left: -0.1rem;
            top: -0.1rem;
            border-radius: 50%;
            border: 1px solid #000;
            animation: ani 1s linear infinite;
        }

        .person:after {
            content: "";
            width: 2.7rem;
            height: 2.7rem;
            position: absolute;
            left: -0.2rem;
            top: -0.2rem;
            border-radius: 50%;
            border: 1px solid #000;
            animation: ani 1s linear infinite .3s;
        }

        @keyframes ani {

            0% {
                transform: scale(1, 1);
                opacity: 1;
            }
            100% {
                transform: scale(1.2, 1.2);
                opacity: 0;
            }

        }

        .name {
            width: 70%;
            height: 30px;
            border-bottom: 1px solid #000;
            position: absolute;
            left: 0;
            right: 0;
            margin: auto;
            bottom: 200px;
        }

        .name input {
            width: 100%;
            height: 100%;
            border: none;
            padding: 0;
            margin: 0;
        }

        .name input:focus {
            outline: none;
        }

        .start {
            width: 2.2rem;
            height: 0.8rem;
            background: url("/static/image/btn1.png") no-repeat center / cover;
            position: absolute;
            left: 50px;
            bottom: 100px;
        }

        .diff {
            display: block;
            width: 2.2rem;
            height: 0.8rem;
            background: url("/static/image/btn3.png") no-repeat center / cover;
            position: absolute;
            right: 50px;
            bottom: 100px;
        }
    </style>
    <script>

        function speak(text, callback) {


            var speach = window.speechSynthesis
            var speachset = new SpeechSynthesisUtterance()
            speachset.onend=function (ev) {
                if(callback){
                    callback()
                }
            }
            speachset.text = text

            speach.speak(speachset)
        }



        window.onload = function (ev) {

            var start = document.querySelector(".start")

            var input=document.querySelector("input")
            start.onclick = function () {
                if(input.value==""){
                    speak("请输入您的名字")
                }else{
                    localStorage.name=input.value
                    location.href="/notice"
                }
            }
        }
    </script>
</head>
<body>
<div class="person">

</div>
<div class="name">
    <input type="text">
</div>
<div class="start">

</div>
<a href="/checkpage" class="diff">

</a>
</body>
</html>